package com.java.yz.day04.ketang;

//两个数组共享一个堆区域

public class ArrayDemo3 {
    public static void main(String[] args) {
        int[] arr1=new int[3];
        System.out.println(arr1);
        System.out.println(arr1[0]);
        System.out.println(arr1[1]);
        System.out.println(arr1[2]);
        System.out.println("++++++++++++++++");

        int[] arr2=arr1;
        arr1[0]=200;
        System.out.println(arr2);
        System.out.println(arr2[0]);
        System.out.println(arr2[1]);
        System.out.println(arr2[2]);
    }
}
